import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 刘国水
 * Date: 2025-04-25
 * Time: 20:07
 */
public class test {
//    输入: nums = [1,2,3,4,5,6,7], k = 3
//    输出: [5,6,7,1,2,3,4]
//    解释:
//    向右轮转 1 步: [7,1,2,3,4,5,6]
//    向右轮转 2 步: [6,7,1,2,3,4,5]
//    向右轮转 3 步: [5,6,7,1,2,3,4]
    public static void main(String[] args) {
        int[] array = {1,2,3,4,5,6,7};
        double k1 = array.length/2.0;
        int k = array.length/2;
        int j = array.length;
        int n = 0;
        if(k1 - k == 0) {
            n = k;
        } else {
            n = k+1;
        }
        int[] array1 = new int[k];
        int[] array2 = new int[j-k];
        for (int i = 0; i < array1.length; i++) {
            array1[i] = array[n];
            n++;
        }

        for (int i = 0; i < array2.length; i++) {
            array2[i] = array[i];
        }

        int[] array3 = new int[array.length];

        for (int i = 0; i < array1.length; i++) {
            array3[i] = array1[i];
        }

        for (int i = 0; i < array2.length ; i++) {
            array3[k] = array2[i];
            k++;
        }

        for (int i = 0; i <= array3.length-1; i++) {
            System.out.print(array3[i] + " ");
        }
    }


public static void main1(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int[] array = new int[scanner.nextInt()];

    for (int i = 0; i <= array.length-1; i++) {
        array[i] = scanner.nextInt();
    }
    for (int i = 0; i <= array.length-1; i++) {
        if(array[i] == 0) {
            System.out.println(i+1);
            return;
        }
    }
}

//   static class ListNode{
//    //数据
//    public int val;
//    //节点的引用
//    public ListNode next;
//
//    public ListNode(int val) {
//        this.val = val;
//    }
//}
//
//    public static void main(String[] args) {
//
//    }
}
